package com.ysm.freestyle.test.jetpack

import android.os.Bundle
import androidx.lifecycle.ViewModelProvider
import com.ysm.freestyle.R
import com.ysm.freestyle.base.BaseActivity
import com.ysm.freestyle.viewmodel.UserViewModel

class ViewModelActivity : BaseActivity() {

    private val userViewModel by lazy { ViewModelProvider(this).get(UserViewModel::class.java) }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_view_model)
        userViewModel.stu.observe(this){

        }
    }

    override fun onRestoreInstanceState(savedInstanceState: Bundle) {
        super.onRestoreInstanceState(savedInstanceState)
    }

    override fun onRetainCustomNonConfigurationInstance(): Any? {

        return super.onRetainCustomNonConfigurationInstance()
    }

}